package com.mengtian_tech.tju.dataquery.api.repo.dataAI;


import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.mengtian_tech.tju.dataquery.api.model.dataAIMysql.SysMenu;


public interface SysMenuRepo extends JpaRepository<SysMenu,String>{
	
	
	@Query("select a from  SysMenu a where a.parentId  = null order by a.menuOrder asc ")
	public List<SysMenu> getTopMenus();
	

	@Query("select a from  SysMenu a where a.parentId  = ?1 order by a.menuOrder asc ")
	public List<SysMenu> getChildren(String parentId);

}
